package org.bright.controller;

import org.bright.entity.R;
import org.bright.service.IPurchaseOrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 * 采购明细表 记录每个采购订单的具体商品信息。 前端控制器
 * </p>
 *
 * @author bright
 * @since 2024-10-21
 */
@RestController
@RequestMapping("/purchaseOrderDetails")
@CrossOrigin
public class PurchaseOrderDetailsController {
    @Autowired
    private IPurchaseOrderDetailsService purchaseOrderDetailsService;
//    查询采购订单明细
    @GetMapping("/queryAllByOrderIdAndSupplierId")
    public R queryAllByOrderIdAndSupplierId(@RequestParam String orderId, @RequestParam Integer supplierId) {
        return R.success(purchaseOrderDetailsService.selectAllByOrderIdAndSupplierId(orderId,supplierId));
    }
}
